import http from '@http/http'

export const getAllByUidPage = (uid, page, size, errMsg) => http.GET(`/api/middleSchool/getAllByUidPage?uid=${uid}&page=${page}&size=${size}`, {}, errMsg)
export const getSumByUid = (uid, errMsg) => http.GET(`/api/middleSchool/getSumByUid?uid=${uid}`, {}, errMsg)
export const getAdmission = (mid, uid, errMsg) => http.GET(`/api/middleSchool/getAdmission?mid=${mid}&uid=${uid}`, {}, errMsg)
export const getMiddleSchool = () => http.GET(`/api/middleSchool/getMiddleSchool`)
export const joinMiddleSchool = (aid) => http.GET(`/api/middleSchool/joinMiddleSchool?aid=${aid}`)
export const insertMiddleSchool = (array) => http.POST(`/api/middleSchool/insertMiddleSchool`, array)
export const insertAdmission = (array) => http.POST(`/api/middleSchool/insertAdmission`, array)
export const getAllAdmiByUid = (uid) => http.GET(`/api/middleSchool/getAllAdmiByUid?uid=${uid}`)
